package viewbuilder.java;

import java.util.List;
import java.util.ArrayList;
import java.util.Arrays;

/**
 *
 */
public class HtmlAttribute {

    String name;
    String value;

    public HtmlAttribute( String name, String value ) {
        this.name = name;
        this.value = value;
    }

    public static List<HtmlAttribute> attrs( HtmlAttribute... attributes ) {
        List<HtmlAttribute> attrs = new ArrayList<HtmlAttribute>();
        attrs.addAll( Arrays.asList( attributes ) );
        return attrs;
    }

    public static HtmlAttribute attr( String name, String value ) {
        return new HtmlAttribute( name, value );
    }

}
